CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

include_directories(${COMN_DIR}/include)
link_directories(${PROJECT_ROOT}/lib)

include_directories(${FFMPEG_DIR}/include)
link_directories(${FFMPEG_LIBRARY_DIR})

include_directories(${JSONCPP_DIR}/include)

include_directories(${THIRD_PARTY}/libflv/include)
include_directories(${THIRD_PARTY}/libmov/include)


include_directories(UniMediaCore/include)
include_directories(UniMediaCore/src)

include_directories(UniMediaMuxer/include)
include_directories(UniMediaMuxer/src)

include_directories(UniMediaSource/include)
include_directories(UniMediaSource/src)
include_directories(UniMediaSource)

include_directories(UniMediaWriter/include)
include_directories(UniMediaWriter/src)

include_directories(UniMediaStore/include)
include_directories(UniMediaStore/src)




include_directories(.)
include_directories(include)
include_directories(src)


aux_source_directory(. SOURCES)
aux_source_directory(src SOURCES)

aux_source_directory(UniMediaCore/src SOURCES)
aux_source_directory(UniMediaMuxer/src SOURCES)
aux_source_directory(UniMediaSource/src SOURCES)
aux_source_directory(UniMediaWriter/src SOURCES)
aux_source_directory(UniMediaStore/src SOURCES)

add_library(UniMediaCore SHARED ${SOURCES})


target_link_libraries(UniMediaCore
	debug comnd optimized comn
    debug libflvd optimized libflv
	debug libmovd optimized libmov
	${JSONCPP_LIBRARIES}
	${FFMPEG_LIBRARIES}
	${FFMPEG_AVUTIL}
	${LIB_PLATFORM}
	)

set_target_properties(UniMediaCore PROPERTIES LINK_INTERFACE_LIBRARIES "")
set_target_properties(UniMediaCore PROPERTIES INTERFACE_LINK_LIBRARIES "")

install(TARGETS UniMediaCore DESTINATION .)